package com.company.project.modular.system.service.impl;

import com.alibaba.dubbo.config.annotation.Reference;
import com.baomidou.mybatisplus.service.impl.ServiceImpl;
import com.company.project.modular.system.model.Buy;
import com.company.project.modular.system.service.IBuyService;
import com.company.project.modular.system.dao.BuyMapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;
import java.util.Map;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author lsf
 * @since 2018-10-30
 */
@Service
public class BuyServiceImpl extends ServiceImpl<BuyMapper, Buy> implements IBuyService {

    /**
     * 查询报买表里面的报买名称
     */
    @Override
    public List<String> findByBuyName() {
        return this.baseMapper.findByBuyName();
    }

    /**
     * 查询最大的buyId
     */
    @Override
    public List<Buy> findByMaxNumber(){
        return this.baseMapper.findByMaxNumber();
    }

    @Override
    public List<Map<String,Object>> findByName(@Param("purName") String purName){
        return this.baseMapper.findByName(purName);
    }

    @Override
    public List<Map<String,Object>> list(String condition){
        return  this.baseMapper.list(condition);
    }

}
